<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>重要的系统配置 | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'system-config.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/system-config.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/system-config.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/system-config.html" rel="nofollow" target="_blank">../en/system-config.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch 权威指南 [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="setup.html">安装和设置</a></span>
»
<span class="breadcrumb-node">重要的系统配置</span>
</div>
<div class="navheader">
<span class="prev">
<a href="error-file-path.html">« JVM致命错误日志</a>
</span>
<span class="next">
<a href="setting-system-settings.html">配置系统设置 »</a>
</span>
</div>
<div class="chapter">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="system-config"></a>重要的系统配置
</h2>
</div></div></div>
<p>
理想情况下，Elasticsearch 应该在一台服务器上单独运行，并使用所有可用的资源。
为此，需要配置你的操作系统，允许运行 Elasticsearch 的用户访问比默认情况下允许的更多的资源。
</p>
<p>在投入生产之前，<span class="strong strong"><strong>必须</strong></span> 考虑以下设置：</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="setup-configuration-memory.html" title="Disable swapping">禁用交换 (Disable swapping)</a>
</li>
<li class="listitem">
<a class="xref" href="file-descriptors.html" title="File Descriptors">增加文件描述符 (Increase file descriptors)</a>
</li>
<li class="listitem">
<a class="xref" href="vm-max-map-count.html" title="Virtual memory">确保足够的虚拟内存 (Ensure sufficient virtual memory)</a>
</li>
<li class="listitem">
<a class="xref" href="max-number-of-threads.html" title="Number of threads">确保足够的线程 (Ensure sufficient threads)</a>
</li>
<li class="listitem">
<a class="xref" href="networkaddress-cache-ttl.html" title="DNS cache settings">JVM DNS缓存设置 (JVM DNS cache settings)</a>
</li>
<li class="listitem">
<a class="xref" href="executable-jna-tmpdir.html" title="JNA temporary directory not mounted with noexec">不使用<code class="literal">noexec</code>挂载临时目录 (Temporary directory not mounted with <code class="literal">noexec</code>)</a>
</li>
</ul>
</div>
<h3>
<a id="dev-vs-prod"></a>开发模式 vs 生产模式
</h3>
<p>
默认情况下，Elasticsearch 假设是在开发模式下工作。
如果上述任何设置配置不正确，将在日志文件中写入警告，但你仍然可以启动并运行 Elasticsearch 节点。
</p>
<p>
一旦配置了 <code class="literal">network.host</code> 这样的网络设置，Elasticsearch 就会认为你正在进入生产环境，并将上述警告升级为异常。
这些异常将阻止 Elasticsearch 节点启动。
这是一项重要的安全措施，可以确保不会因为服务器配置不当而丢失数据。
</p>







</div>
<div class="navfooter">
<span class="prev">
<a href="error-file-path.html">« JVM致命错误日志</a>
</span>
<span class="next">
<a href="setting-system-settings.html">配置系统设置 »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>